// 解析 Date 对象

let names ;

console.log( '- - - - - Date静态属性 - - - - -' );

names = Object.getOwnPropertyNames( Date );
console.log( names );

console.log( '- - - - - Date原型属性 - - - - -' );

names = Object.getOwnPropertyNames( Date.prototype );
console.log( names );

console.log( '- - - - - Date构造函数 - - - - -' );

let now = new Date();
console.log( now.toString() );
console.log( now.toLocaleString() );
console.log( now.toDateString() );
console.log( now.toLocaleDateString() );
console.log( now.toTimeString() );
console.log( now.toLocaleTimeString() );
console.log( now.toISOString() );
console.log( now.toUTCString() ); // 神马是UTC呢?

// 绝对鄙视使用 getYear 的 coder
console.log( now.getYear() , now.getFullYear() );

now.setFullYear( 2050 );

console.log( now.toString() );

// 从历元开始到指定时刻所经历的毫秒值
// 历元(epoch): 1970-01-01 00:00:00.000
let millis = now.getTime(); // 获取毫秒值
console.log( millis );

now.setTime( -1 );

console.log( now.toISOString() );